<template>
  <Swiper v-bine="{ ...props.cswiperOpt }" @slideChange="(a) => emit('emitChange', a)" id="swiper">
    <SwiperSlide :key="currentItem" v-for="(currentItem, index) in props.list">
      <slot name="content" :currentItem="currentItem" :index="index"></slot>
    </SwiperSlide>
  </Swiper>
</template>

<script setup lang="ts">
import "swiper/css";
import "swiper/css/effect-coverflow";
import type { ISwiperP } from "../index";
import { Swiper, SwiperSlide } from "swiper/vue";
const emit = defineEmits(["emitChange"]);
let props = withDefaults(defineProps<ISwiperP>(), {
  cswiperOpt: {},
  list: []
});
</script>

<style lang="scss" scoped></style>
